xdg_surface_set_transient_for (impl->xdg_surface, transient_for_surface);
}
+static void
+gdk_wayland_window_sync_title (GdkWindow *window)
+{
+ GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
+
+ if (!impl->xdg_surface)
+ return;
+
+ if (!impl->title)
+ return;
+
+ xdg_surface_set_title (impl->xdg_surface, impl->title);
+}
+
static void
surface_enter (void *data,
struct wl_surface *wl_surface,
impl->xdg_surface = xdg_shell_get_xdg_surface (display_wayland->xdg_shell, impl->surface);
xdg_surface_add_listener (impl->xdg_surface, &xdg_surface_listener, window);
+
+ gdk_wayland_window_sync_title (window);
+ xdg_surface_set_app_id (impl->xdg_surface, gdk_get_program_class ());
}
static void
if (!impl->surface)
gdk_wayland_window_create_surface (window);
- if (impl->xdg_surface)
- {
- if (impl->title)
- xdg_surface_set_title (impl->xdg_surface, impl->title);
-
- xdg_surface_set_app_id (impl->xdg_surface, gdk_get_program_class ());
- }
-
gdk_window_set_type_hint (window, impl->hint);
_gdk_make_event (window, GDK_MAP, NULL, FALSE);
g_free (impl->title);
impl->title = g_strdup (title);
+
+ gdk_wayland_window_sync_title (window);
}
static void